package at.jku.ce.georg;

import javax.servlet.http.HttpServletRequest;

public class ContainsBean {
	
	
	public boolean requestContainsShow(HttpServletRequest request, String what){
		
		if(request.getParameterValues("show")==null)
			return true;
		for(String whatvalue : request.getParameterValues("show"))
			if(whatvalue.equals(what))
				return true;
		return false;
	}
	
	
	public String printStringArray(String[] stringvalues) {
		StringBuffer result = new StringBuffer();
		if(stringvalues!=null){
			for(String value : stringvalues) {
				result.append(value);
				result.append(" <br />");
			}
		} else {
			result.append("null");
		}
		return result.toString();
	}

}
